var e = require;
var t = module;
var o = exports;
var Adv_skd=require("./Adv_skd");
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("LoadRes"),
    a = e("sdkConfig"),
    i = (function () {
        function e() {
            (this.SW_SystemBanner = !1),
                (this.SW_SystemInters = !1),
                (this.SW_Video = !1),
                (this.SW_Native = !1),
                (this.SW_NativeBanner = !1),
                (this.SW_NativeInters = !1),
                (this.SW_Box = !1),
                (this.SW_Block = !1),
                (this.ID_SystemBanner = "999"),
                (this.ID_SystemInters = "999"),
                (this.ID_Native = ""),
                (this.ID_NativeCustom = ""),
                (this.ID_Video = "999"),
                (this.ID_Box = ""),
                (this.ID_Block = ""),
                (this.NUM_NativeIntersP = 0),
                (this.NUM_NativeIntersReport = 1),
                (this.NUM_BannerErrP = 0),
                (this.NUM_BannerErrMost = 0),
                (this.NUM_BannerErrMust = 0),
                (this.NUM_VideoErrP = 0),
                (this.NUM_VideoErrMost = 0),
                (this.NUM_VideoErrMust = 0),
                (this.NUM_BannerUpdateTime = 30),
                (this.SW_SystemBannerFirst = !0),
                (this.NUM_BannerMostShow = 99),
                (this.SW_IntersBaseControl = !1),
                (this.NUM_IntersStart = 0),
                (this.NUM_IntersIntervalNum = 0),
                (this.NUM_IntersIntervalTime = 0),
                (this.NUM_IntersDelayTime = 0),
                (this.NUM_IntersDelayP = 0),
                (this.NUM_NativeUpdateTime = 30),
                (this.SW_AddDesktop = !1),
                (this.SW_IntersIntervalToAddDesktop = !1),
                (this.NUM_AutoAddDeskMostTimes = 0),
                (this.NUM_IntersToAddDesktopNumber = 0),
                (this.SW_Statistics = !0),
                (this.SW_NavigateIcon = !1),
                (this.SW_NavigateGroup = !1),
                (this.SW_NavigateSettle = !1),
                (this.pushGameList = null),
                (this.NUM_hasShowInters = 0),
                (this.NUM_intersNowInterval = 0),
                (this.NUM_IntersNowIntervalTime = 99),
                (this.NUM_IntersNowToAddDesktop = 0),
                (this.bannerAd = null),
                (this.loadSucc_SystemBanner = !1),
                (this.loadSucc_Banner = !1),
                (this.hasShowBanner = !1),
                (this.interval_updateBanner = null),
                (this.timeout_checkBannerLoadSucc = null),
                (this.NUM_CheckBannerLoadSucc = 0),
                (this.NUM_MaxCheckBannerLoadSucc = 5),
                (this.NUM_BannerClose = 0),
                (this.systemIntersAd = null),
                (this.loadSucc_SystemInters = !1),
                (this.videoAd = null),
                (this.loadSucc_Video = !1),
                (this.callback_Video = null),
                (this.nativeAd = null),
                (this.param_nativeIcon = {x: 0, y: 0}),
                (this.loadSucc_NativeIcon = !1),
                (this.isShow_NativeIcon = !1),
                (this.timeout_updateNativeIcon = null),
                (this.blockAd = null),
                (this.loadSucc_Block = !1),
                (this.param_block = {type: "white", blockSize: 5, blockX: 0, blockY: 0}),
                (this.timeout_updateBlock = null),
                (this.navigateIconRes = null),
                (this.loadSucc_NavigateIcon = !1),
                (this.navigateGroupRes = null),
                (this.loadSucc_NavigateGroup = !1),
                (this.navigateSettleRes = null),
                (this.loadSucc_NavigateSettle = !1),
                (this.pushGameListIconTexture = []),
                (this.loadSucc_PushGameList = !1),
                (this.isShow_NavigateIcon = !1),
                (this.isShow_NavigateGroup = !1),
                (this.isShow_NavigateSettle = !1),
                (this.isShow_NavigateSettle1 = !1),
                (this.node_navigateIcon = null),
                (this.node_navigateGroup = null),
                (this.node_navigateSettle = null),
                (this.interval_updateNavigateIcon = null),
                (this.timeout_hideNavigateGroupIcon = null),
                (this.nodeArr_NavigateGroupGetIcon = []),
                (this.NUM_NowErrBanner = 0),
                (this.isShow_ErrBanner = !1),
                (this.node_ErrBanner = null),
                (this.errBannerHasShowBanner = !1),
                (this.NUM_errBannerHasCallback = 0),
                (this.NUM_NowGetErrBannerFlag = 0),
                (this.NUM_NowErrVideo = 0),
                (this.NUM_NowGetErrVideoFlag = 0),
                (this.AdGroup = "");
        }
        return (
            (e.prototype.getGameTestVersion = function () {
                return !1;
            }),
            (e.prototype.createAd = function () {
                this.SW_SystemBanner && "" != this.ID_SystemBanner && this.createSystemBanner(),
                    this.SW_SystemInters && "" != this.ID_SystemInters && this.createSystemInters(),
                    this.NUM_IntersIntervalTime > 0 && this.runIntersInterval(),
                    this.SW_Video && "" != this.ID_Video && this.createVideo(),
                    this.SW_Native && "" != this.ID_Native && this.createNative();
            }),
            (e.prototype.startLoadPushGamaes = function () {
                this.SW_NavigateIcon && this.loadNavigateIconRes(),
                    this.SW_NavigateGroup && this.loadNavigateGroupRes(),
                    this.SW_NavigateSettle && this.loadNavigateSettleRes(),
                    (this.SW_NavigateIcon || this.SW_NavigateGroup || this.SW_NavigateSettle) &&
                        this.loadPushGameList();
            }),
            (e.prototype.createSystemBanner = function () {
                var e = this;
                if (
                    (console.log("ChaoQiGameSDK", "--createSystemBanner--"),
                    a.default.stringHasSpace(this.ID_SystemBanner))
                )
                    console.log(
                        "ChaoQiGameSDK",
                        "channelId:",
                        a.default.channelId,
                        "当前渠道系统banner广告ID中含有空字符串,请检查后台系统banner广告ID*********************"
                    );
                else {
                    var t = Number(wx.getSystemInfoSync().windowWidth),
                        o = Number(wx.getSystemInfoSync().windowHeight),
                        n = cc.winSize.width < cc.winSize.height;
                    (this.bannerAd = wx.createBannerAd({
                        adUnitId: Adv_skd.default.instance.getAds().bannerId,
                        style: {left: 10, top: 76, height: 50, width: n ? t : 300}
                    })),
                        this.bannerAd.onResize(function (n) {
                            (e.bannerAd.style.top = o - n.height), (e.bannerAd.style.left = (t - n.width) / 2);
                        }),
                        this.bannerAd.onLoad(function () {
                            console.log("ChaoQiGameSDK", "WX banner加载成功"),
                                (e.loadSucc_SystemBanner = !0),
                                e.hasShowBanner && e.showSystemBanner();
                        }),
                        this.bannerAd.onError(function (t) {
                            console.log("ChaoQiGameSDK", "WX banner加载失败：", JSON.stringify(t)),
                                setTimeout(function () {
                                    e.createSystemBanner();
                                }, 1e4);
                        });
                }
            }),
            (e.prototype.createSystemInters = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createSystemInters--"),
                    a.default.stringHasSpace(this.ID_SystemInters)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道系统插屏广告ID中含有空字符串,请检查后台系统插屏广告ID*********************"
                          )
                        : ((this.systemIntersAd = wx.createInterstitialAd({adUnitId: Adv_skd.default.instance.getAds().interstitialId})),
                          this.systemIntersAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "WX 插屏广告加载完成"), (e.loadSucc_SystemInters = !0);
                          }),
                          this.systemIntersAd.onError(function (t) {
                              console.log("ChaoQiGameSDK", "WX 插屏广告加载失败：", JSON.stringify(t)),
                                  (e.loadSucc_SystemInters = !1),
                                  setTimeout(function () {
                                      e.systemIntersAd && e.systemIntersAd.load();
                                  }, 3e4);
                          }),
                          this.systemIntersAd.onClose(function () {
                              e.NUM_IntersNowIntervalTime = 0;
                          }),
                          this.systemIntersAd.load());
            }),
            (e.prototype.createVideo = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createVideo--"),
                    a.default.stringHasSpace(this.ID_Video)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道视频广告ID中含有空字符串,请检查后台视频广告ID*********************"
                          )
                        : ((this.videoAd = wx.createRewardedVideoAd({adUnitId: Adv_skd.default.instance.getAds().videoAdId})),
                          this.videoAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "WX 视频广告加载完成"), (e.loadSucc_Video = !0);
                          }),
                          this.videoAd.onError(function (t) {
                              console.log("ChaoQiGameSDK", "WX 视频广告加载失败：" + JSON.stringify(t)),
                                  (e.loadSucc_Video = !1),
                                  setTimeout(function () {
                                      e.videoAd && e.videoAd.load();
                                  }, 3e4);
                          }),
                          this.videoAd.onClose(function (t) {
                              setTimeout(function () {
                                  t.isEnded
                                      ? (console.log("ChaoQiGameSDK", "WX 激励视频广告完成,发放奖励"),
                                        e.callback_Video &&
                                            (e.callback_Video(!0), (e.loadSucc_Video = !1), e.videoAd.load()))
                                      : (console.log("ChaoQiGameSDK", "WX 激励视频广告取消关闭,不发放奖励"),
                                        e.callback_Video &&
                                            (e.callback_Video(!1), (e.loadSucc_Video = !1), e.videoAd.load()));
                              }, 500);
                          }),
                          this.videoAd.load());
            }),
            (e.prototype.createNative = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createNative--"),
                    a.default.stringHasSpace(this.ID_Native)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道原生广告ID中含有空字符串,请检查后台原生广告ID*********************"
                          )
                        : ((this.nativeAd = wx.createCustomAd({
                              adUnitId: this.ID_Native,
                              adIntervals: 30,
                              style: {left: this.param_nativeIcon.x, top: this.param_nativeIcon.y, fixed: !0}
                          })),
                          this.nativeAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "WX 原生ICON加载成功"), (e.loadSucc_NativeIcon = !0);
                          }),
                          this.nativeAd.onError(function (t) {
                              console.log("ChaoQiGameSDK", "WX 原生ICON加载失败：", JSON.stringify(t)),
                                  (e.loadSucc_NativeIcon = !1);
                          }),
                          this.nativeAd.onClose(function () {
                              console.log("ChaoQiGameSDK", "WX 手动关闭原生ICON 30s后再次刷新"),
                                  e.timeout_updateNativeIcon && clearTimeout(e.timeout_updateNativeIcon),
                                  e.hideNativeIcon(),
                                  (e.timeout_updateNativeIcon = setTimeout(function () {
                                      e.createNative(),
                                          setTimeout(function () {
                                              e.nativeAd.show();
                                          }, 500);
                                  }, 3e4));
                          }));
            }),
            (e.prototype.createBlock = function () {}),
            (e.prototype.loadNavigateIconRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNavigateIconRes--"),
                    (this.navigateIconRes = {NavigateIconBg: null, NavigateIconMask: null, NavigateIconMoreGame: null}),
                    n.default.loadResArray(
                        [
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateIconBg.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateIconMask.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateIconMoreGame.png"
                        ],
                        function (t, o) {
                            (e.navigateIconRes.NavigateIconBg = o[0]),
                                (e.navigateIconRes.NavigateIconMask = o[1]),
                                (e.navigateIconRes.NavigateIconMoreGame = o[2]),
                                (e.loadSucc_NavigateIcon = !0),
                                console.log("ChaoQiGameSDK", "互推ICON资源加载成功");
                        }
                    );
            }),
            (e.prototype.loadNavigateGroupRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNavigateGroupRes--"),
                    (this.navigateGroupRes = {
                        NavigateGroupIconBtn: null,
                        NavigateGroupIconMask: null,
                        NavigateGroupLeftTuck: null,
                        NavigateGroupListLeft: null,
                        NavigateGroupListRight: null,
                        NavigateGroupRightTuck: null
                    }),
                    n.default.loadResArray(
                        [
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateGroupIconBtn.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateGroupIconMask.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateGroupLeftTuck.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateGroupListLeft.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateGroupListRight.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateGroupRightTuck.png"
                        ],
                        function (t, o) {
                            (e.navigateGroupRes.NavigateGroupIconBtn = o[0]),
                                (e.navigateGroupRes.NavigateGroupIconMask = o[1]),
                                (e.navigateGroupRes.NavigateGroupLeftTuck = o[2]),
                                (e.navigateGroupRes.NavigateGroupListLeft = o[3]),
                                (e.navigateGroupRes.NavigateGroupListRight = o[4]),
                                (e.navigateGroupRes.NavigateGroupRightTuck = o[5]),
                                (e.loadSucc_NavigateGroup = !0),
                                console.log("ChaoQiGameSDK", "互推列表资源加载成功");
                        }
                    );
            }),
            (e.prototype.loadNavigateSettleRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNavigateSettleRes--"),
                    (this.navigateSettleRes = {
                        NavigateSettle1Bg: null,
                        NavigateSettle2Bg: null,
                        NavigateSettleIconYellow: null,
                        NavigateSettleIconMask: null,
                        NavigateSettleNameBg: null
                    }),
                    n.default.loadResArray(
                        [
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateSettle1Bg.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateSettle2Bg.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateSettleIconYellow.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateSettleIconMask.png",
                            "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NavigateSettleNameBg.png"
                        ],
                        function (t, o) {
                            (e.navigateSettleRes.NavigateSettle1Bg = o[0]),
                                (e.navigateSettleRes.NavigateSettle2Bg = o[1]),
                                (e.navigateSettleRes.NavigateSettleIconYellow = o[2]),
                                (e.navigateSettleRes.NavigateSettleIconMask = o[3]),
                                (e.navigateSettleRes.NavigateSettleNameBg = o[4]),
                                (e.loadSucc_NavigateSettle = !0),
                                console.log("ChaoQiGameSDK", "结算互推资源加载成功");
                        }
                    );
            }),
            (e.prototype.loadPushGameList = function () {
                var e = this;
                if ((console.log("ChaoQiGameSDK", "--loadPushGameList--"), null != this.pushGameList))
                    for (
                        var t = 0,
                            o = function (o) {
                                cc.loader.load(n.pushGameList[o].pushGamePicture, function (n, a) {
                                    n
                                        ? (console.log("ChaoQiGameSDK", "pushGameList icon" + o + "加载失败"),
                                          cc.loader.load(
                                              "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Navigate/NoIcon.png",
                                              function (n, a) {
                                                  t++,
                                                      n
                                                          ? (e.pushGameListIconTexture[o] = null)
                                                          : ((e.pushGameListIconTexture[o] = a),
                                                            t >= e.pushGameList.length &&
                                                                (e.loadSucc_PushGameList = !0));
                                              }
                                          ))
                                        : (t++,
                                          (e.pushGameListIconTexture[o] = a),
                                          t >= e.pushGameList.length && (e.loadSucc_PushGameList = !0));
                                });
                            },
                            n = this,
                            a = 0;
                        a < this.pushGameList.length;
                        a++
                    )
                        o(a);
            }),
            (e.prototype.showBanner = function () {
                if (this.loadSucc_Banner)
                    return this.NUM_BannerMostShow <= this.NUM_BannerClose
                        ? (console.log(
                              "ChaoQiGameSDK",
                              "banner最大关闭次数",
                              this.NUM_BannerMostShow,
                              " 已达上限 return"
                          ),
                          void (this.interval_updateBanner && clearInterval(this.interval_updateBanner)))
                        : void (this.isShow_NavigateSettle1
                              ? console.log("ChaoQiGameSDK", "正在展示结算互推1,无法showBanner")
                              : this.hasShowBanner
                              ? console.log("ChaoQiGameSDK", "已经调用过showBanner,请勿重复调用")
                              : ((this.hasShowBanner = !0),
                                this.SW_SystemBanner && (this.showSystemBanner(), this.updateSystemBanner())));
                this.checkBannerLoadSucc();
            }),
            (e.prototype.hideBanner = function () {
                (this.hasShowBanner = !1),
                    this.hideSystemBanner(),
                    this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc);
            }),
            (e.prototype.getIntersFlag = function () {
                return this.loadSucc_SystemInters;
            }),
            (e.prototype.showInters = function () {
                var e = this;
                if (
                    (this.NUM_hasShowInters++,
                    this.SW_IntersIntervalToAddDesktop &&
                        this.NUM_hasShowInters <= this.NUM_IntersToAddDesktopNumber &&
                        (console.log(
                            "ChaoQiGameSDK",
                            "第" + this.NUM_IntersToAddDesktopNumber + "次插屏变添加桌面",
                            "当前第" + this.NUM_hasShowInters + "次"
                        ),
                        this.NUM_hasShowInters == this.NUM_IntersToAddDesktopNumber))
                )
                    this.getAddDesktopFlag(function (t) {
                        t && (console.log("ChaoQiGameSDK", "插屏变添加桌面"), e.addDesktop(function () {}));
                    });
                else {
                    if (this.SW_IntersBaseControl) {
                        if (this.NUM_hasShowInters < this.NUM_IntersStart)
                            return void console.log(
                                "ChaoQiGameSDK",
                                "插屏开始次数未达到",
                                this.NUM_hasShowInters,
                                "目标次数",
                                this.NUM_IntersStart
                            );
                        if (this.NUM_intersNowInterval < this.NUM_IntersIntervalNum)
                            return (
                                console.log(
                                    "ChaoQiGameSDK",
                                    "插屏间隔次数未达到",
                                    this.NUM_intersNowInterval,
                                    "目标次数",
                                    this.NUM_IntersIntervalNum
                                ),
                                void this.NUM_intersNowInterval++
                            );
                        if (this.NUM_IntersNowIntervalTime < this.NUM_IntersIntervalTime)
                            return (
                                console.log(
                                    "ChaoQiGameSDK",
                                    "插屏间隔时间未达到",
                                    this.NUM_IntersNowIntervalTime,
                                    "目标时间",
                                    this.NUM_IntersIntervalTime
                                ),
                                void (
                                    this.SW_AddDesktop &&
                                    this.NUM_IntersNowToAddDesktop < this.NUM_AutoAddDeskMostTimes &&
                                    this.getAddDesktopFlag(function (t) {
                                        t &&
                                            (e.NUM_IntersNowToAddDesktop++,
                                            e.addDesktop(function () {
                                                console.log("ChaoQiGameSDK", "插屏间隔弹桌面");
                                            }));
                                    })
                                )
                            );
                    }
                    (this.NUM_intersNowInterval = 0),
                        this.NUM_IntersDelayTime > 0 && Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                            ? (console.log("ChaoQiGameSDK", "插屏延迟时间(ms):" + this.NUM_IntersDelayTime),
                              setTimeout(function () {
                                  e.loadSucc_SystemInters && e.showSystemInters();
                              }, this.NUM_IntersDelayTime))
                            : this.loadSucc_SystemInters && this.showSystemInters();
                }
            }),
            (e.prototype.getVideoFlag = function () {
                return this.loadSucc_Video;
            }),
            (e.prototype.showVideo = function (e) {
                var t = this;
                this.videoAd &&
                    this.loadSucc_Video &&
                    ((this.callback_Video = e),
                    console.log("ChaoQiGameSDK", "WX showVideo========================"),
                    this.videoAd
                        .show()
                        .then(function () {
                            console.log("ChaoQiGameSDK", "WX 激励视频广告显示成功");
                        })
                        .catch(function (e) {
                            console.log("ChaoQiGameSDK", "WX 激励视频广告播放失败：", JSON.stringify(e)),
                                t.videoAd.load().then(function () {
                                    console.log("ChaoQiGameSDK", "WX 激励视频广告手动加载成功"),
                                        t.videoAd.show().catch(function (e) {
                                            console.log(
                                                "ChaoQiGameSDK",
                                                "WX 激励视频广告播放失败：",
                                                JSON.stringify(e)
                                            ),
                                                (t.loadSucc_Video = !1),
                                                t.callback_Video(!1);
                                        });
                                });
                        }));
            }),
            (e.prototype.getNativeIconFlag = function () {
                return this.loadSucc_NativeIcon;
            }),
            (e.prototype.showNativeIcon = function (e, t, o, n) {
                var a = this;
                if (this.isShow_NativeIcon) console.log("ChaoQiGameSDK", "原生icon正在展示中,请勿多次show return");
                else {
                    this.isShow_NativeIcon = !0;
                    var i = Number(wx.getSystemInfoSync().windowWidth),
                        r = Number(wx.getSystemInfoSync().windowHeight),
                        s = n;
                    (n = cc.winSize.height - n),
                        (this.param_nativeIcon.x = o * (i / cc.winSize.width)),
                        (this.param_nativeIcon.y = n * (r / cc.winSize.height)),
                        this.nativeAd && this.nativeAd.destroy(),
                        this.SW_Native && "" != this.ID_Native && this.createNative(),
                        setTimeout(function () {
                            console.log("ChaoQiGameSDK", "WX showNativeIcon==============================="),
                                a.nativeAd.show();
                        }, 500),
                        (this.timeout_updateNativeIcon = setTimeout(function () {
                            console.log("ChaoQiGameSDK", "WX 刷新原生ICON广告================"),
                                a.hideNativeIcon(),
                                a.showNativeIcon(0, 0, a.param_nativeIcon.x, s);
                        }, 3e4));
                }
            }),
            (e.prototype.hideNativeIcon = function () {
                console.log("ChaoQiGameSDK", "WX hideNativeIcon==========================="),
                    (this.isShow_NativeIcon = !1),
                    this.timeout_updateNativeIcon && clearTimeout(this.timeout_updateNativeIcon),
                    this.nativeAd && this.nativeAd.destroy();
            }),
            (e.prototype.getNativeImageFlag = function () {
                return !1;
            }),
            (e.prototype.showNativeImage = function () {}),
            (e.prototype.hideNativeImage = function () {}),
            (e.prototype.getNativeAdFlag = function () {
                return !1;
            }),
            (e.prototype.getNativeAdInfo = function () {
                return null;
            }),
            (e.prototype.reportNativeAdShow = function () {}),
            (e.prototype.reportNativeAdClick = function () {}),
            (e.prototype.getNavigateIconFlag = function () {
                return this.loadSucc_NavigateIcon && this.loadSucc_PushGameList && !this.isShow_NavigateIcon;
            }),
            (e.prototype.showNavigateIcon = function (e, t, o, n) {
                var a = this;
                if (this.loadSucc_NavigateIcon && this.loadSucc_PushGameList) {
                    if (this.isShow_NavigateIcon)
                        console.log("ChaoQiGameSDK", "已存在互推列表,请勿多次调用showNavigateIcon");
                    else {
                        this.isShow_NavigateIcon = !0;
                        for (var i = 0, r = 0; r < this.pushGameList.length; r++) i += this.pushGameList[r].sort;
                        for (
                            var s = Math.floor(Math.random() * i), l = 0, c = null, d = 0, h = 0;
                            h < this.pushGameList.length;
                            h++
                        ) {
                            if (s >= l && s < l + this.pushGameList[h].sort) {
                                (c = this.pushGameList[h]), (d = h);
                                break;
                            }
                            l += this.pushGameList[h].sort;
                        }
                        console.log("ChaoQiGameSDK", "showNavigateIcon===========================");
                        var _ = cc.director.getScene();
                        (this.node_navigateIcon = new cc.Node("node_navigateIcon")),
                            _.addChild(this.node_navigateIcon),
                            this.node_navigateIcon.addComponent(cc.Sprite),
                            (this.node_navigateIcon.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.navigateIconRes.NavigateIconBg
                            )),
                            (this.node_navigateIcon.width = e),
                            (this.node_navigateIcon.height = t),
                            (this.node_navigateIcon.x = o),
                            (this.node_navigateIcon.y = n),
                            (this.node_navigateIcon.zIndex = 29999),
                            this.node_navigateIcon.runAction(
                                cc.repeatForever(
                                    cc.sequence(
                                        cc.scaleBy(0.2, 1.1),
                                        cc.rotateTo(0.1, 30),
                                        cc.rotateTo(0.1, -25),
                                        cc.rotateTo(0.1, 20),
                                        cc.rotateTo(0.1, 0),
                                        cc.scaleBy(0.2, 1 / 1.1),
                                        cc.delayTime(5)
                                    )
                                )
                            ),
                            this.node_navigateIcon.on(cc.Node.EventType.TOUCH_START, function () {
                                a.jumpToMiniGame(c);
                            }),
                            "" != this.AdGroup && (this.node_navigateIcon.group = this.AdGroup);
                        var u = new cc.Node("NavigateIconMask");
                        this.node_navigateIcon.addChild(u),
                            u.addComponent(cc.Mask),
                            (u.getComponent(cc.Mask).type = cc.Mask.Type.IMAGE_STENCIL),
                            (u.getComponent(cc.Mask).spriteFrame = new cc.SpriteFrame(
                                this.navigateIconRes.NavigateIconMask
                            )),
                            (u.getComponent(cc.Mask).alphaThreshold = 0.5),
                            (u.width = 0.92 * e),
                            (u.height = 0.92 * t);
                        var p = new cc.Node("navigateIconImage");
                        u.addChild(p),
                            p.addComponent(cc.Sprite),
                            (p.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.pushGameListIconTexture[d]
                            )),
                            (p.width = u.width),
                            (p.height = u.height);
                        var m = new cc.Node("title");
                        this.node_navigateIcon.addChild(m),
                            m.addComponent(cc.Sprite),
                            (m.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.navigateIconRes.NavigateIconMoreGame
                            )),
                            (m.width = 0.9 * e),
                            (m.height = 0.19 * t),
                            (m.x = 0),
                            (m.y = m.height / 2 - t / 2 + 0.05 * t),
                            (this.interval_updateNavigateIcon = setInterval(function () {
                                a.hideNavigateIcon(), a.showNavigateIcon(e, t, o, n);
                            }, 2e4));
                    }
                } else console.log("ChaoQiGameSDK", "互推icon资源未加载完成");
            }),
            (e.prototype.hideNavigateIcon = function () {
                (this.isShow_NavigateIcon = !1),
                    this.interval_updateNavigateIcon && clearInterval(this.interval_updateNavigateIcon),
                    this.node_navigateIcon &&
                        (console.log("ChaoQiGameSDK", "hideNavigateIcon==========================="),
                        this.node_navigateIcon.removeFromParent(),
                        (this.node_navigateIcon = null));
            }),
            (e.prototype.getNavigateGroupFlag = function () {
                return this.loadSucc_NavigateGroup && this.loadSucc_PushGameList && !this.isShow_NavigateGroup;
            }),
            (e.prototype.showNavigateGroup = function (e, t, o, n) {
                var a = this;
                if (this.loadSucc_NavigateGroup && this.loadSucc_PushGameList) {
                    if (this.pushGameList.length < 6)
                        console.log("ChaoQiGameSDK", "后台配置互推游戏样式数量小于6个,无法展示");
                    else if (this.isShow_NavigateGroup)
                        console.log("ChaoQiGameSDK", "已存在互推列表,请勿多次调用showNavigateGroup");
                    else {
                        this.isShow_NavigateGroup = !0;
                        var i = cc.director.getScene(),
                            r = function () {
                                (s.width = o),
                                    (s.height = o),
                                    a.timeout_hideNavigateGroupIcon && clearTimeout(a.timeout_hideNavigateGroupIcon),
                                    !d &&
                                        s.active &&
                                        (a.timeout_hideNavigateGroupIcon = setTimeout(function () {
                                            console.log("ChaoQiGameSDK", "隐藏一半互推列表icon"),
                                                cc
                                                    .tween(s)
                                                    .by(0.5, {
                                                        position: cc.v3(s.x <= 0 ? -s.width / 2 : s.width / 2, 0, 0)
                                                    })
                                                    .start();
                                        }, 1e4));
                            };
                        (this.node_navigateGroup = new cc.Node("node_navigateGroup")),
                            i.addChild(this.node_navigateGroup),
                            (this.node_navigateGroup.x = cc.winSize.width / 2),
                            (this.node_navigateGroup.y = cc.winSize.height / 2),
                            "" != this.AdGroup && (this.node_navigateGroup.group = this.AdGroup);
                        var s = new cc.Node("NavigateGroupIconBtn");
                        this.node_navigateGroup.addChild(s),
                            s.addComponent(cc.Sprite),
                            (s.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.navigateGroupRes.NavigateGroupIconBtn
                            )),
                            (s.width = o),
                            (s.height = o),
                            "left" == t
                                ? ((s.x = s.width / 2 - cc.winSize.width / 2), (s.y = n))
                                : ((s.x = cc.winSize.width / 2 - s.width / 2), (s.y = n));
                        var l,
                            c,
                            d = !1,
                            h = function (e) {
                                for (var t = a.pushGameList, o = [], n = 0; n < t.length; n++)
                                    (o[n] = t[n]), (o[n].index = n);
                                var i = function () {
                                    for (var e = 0, t = 0; t < o.length; t++) e += o[t].sort;
                                    for (var n = Math.floor(Math.random() * e), a = 0, i = 0; i < o.length; i++) {
                                        if (n >= a && n < a + o[i].sort) {
                                            var r = o[i];
                                            return o.splice(i, 1), r;
                                        }
                                        a += o[i].sort;
                                    }
                                };
                                if (e) {
                                    console.log("ChaoQiGameSDK", "在左侧打开互推游戏列表"), (s.active = !1);
                                    var l = new cc.Node("NavigateGroupListLeft");
                                    a.node_navigateGroup.addChild(l),
                                        l.addComponent(cc.Sprite),
                                        (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                            a.navigateGroupRes.NavigateGroupListLeft
                                        )),
                                        (l.height = cc.winSize.height / 2),
                                        (l.width = l.height / 4.8),
                                        (l.x = -l.width / 2 - cc.winSize.width / 2),
                                        (l.y = 0),
                                        cc
                                            .tween(l)
                                            .by(0.2, {position: cc.v3(l.width, 0, 0)})
                                            .call(function () {
                                                (d = !0), r();
                                            })
                                            .start();
                                    var c = new cc.Node();
                                    l.addChild(c),
                                        c.addComponent(cc.Sprite),
                                        (c.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                            a.navigateGroupRes.NavigateGroupLeftTuck
                                        )),
                                        (c.width = 0.5 * l.width),
                                        (c.height = 1.2 * c.width),
                                        (c.x = 0.65 * l.width),
                                        (c.y = 0.3 * l.height),
                                        c.on(cc.Node.EventType.TOUCH_END, function () {
                                            d &&
                                                cc
                                                    .tween(l)
                                                    .by(0.5, {position: cc.v3(-l.width, 0, 0)})
                                                    .call(function () {
                                                        (d = !1), (s.active = !0), r(), l.destroy();
                                                    })
                                                    .start();
                                        });
                                    var h = new cc.Node();
                                    l.addChild(h),
                                        h.addComponent(cc.Mask),
                                        (h.getComponent(cc.Mask).type = 0),
                                        (h.width = 0.8 * l.width),
                                        (h.height = 0.85 * l.height),
                                        (h.x = -l.width / 13),
                                        (h.y = -l.height / 22);
                                    var _ = new cc.Node();
                                    h.addChild(_), (_.x = 0), (_.y = 0);
                                    for (
                                        var u = function (e) {
                                                var t = i();
                                                (g = new cc.Node()),
                                                    _.addChild(g),
                                                    g.addComponent(cc.Sprite),
                                                    (g.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                        a.pushGameListIconTexture[t.index]
                                                    )),
                                                    (g.width = 0.9 * h.width),
                                                    (g.height = g.width),
                                                    (g.x = 0),
                                                    (g.y = 1.15 * -(e - 2) * g.height),
                                                    g.on(cc.Node.EventType.TOUCH_START, function () {
                                                        a.jumpToMiniGame(t);
                                                    }),
                                                    (a.nodeArr_NavigateGroupGetIcon[e] = g);
                                            },
                                            p = 0;
                                        p < 6;
                                        p++
                                    )
                                        u(p);
                                    cc.tween(_)
                                        .repeatForever(
                                            cc
                                                .tween()
                                                .delay(1)
                                                .by(3, {position: cc.v3(0, 1.15 * g.height)})
                                                .call(function () {
                                                    a.nodeArr_NavigateGroupGetIcon[0].y -= 1.15 * 6 * g.height;
                                                    for (var e = a.nodeArr_NavigateGroupGetIcon[0], t = 0; t < 6; t++)
                                                        t < 5 &&
                                                            (a.nodeArr_NavigateGroupGetIcon[t] =
                                                                a.nodeArr_NavigateGroupGetIcon[t + 1]);
                                                    a.nodeArr_NavigateGroupGetIcon[5] = e;
                                                })
                                        )
                                        .start();
                                } else {
                                    console.log("ChaoQiGameSDK", "在右侧打开互推游戏列表"), (s.active = !1);
                                    var m = new cc.Node("NavigateGroupListRight");
                                    a.node_navigateGroup.addChild(m),
                                        m.addComponent(cc.Sprite),
                                        (m.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                            a.navigateGroupRes.NavigateGroupListRight
                                        )),
                                        (m.height = cc.winSize.height / 2),
                                        (m.width = m.height / 4.8),
                                        (m.x = m.width / 2 + cc.winSize.width / 2),
                                        (m.y = 0),
                                        cc
                                            .tween(m)
                                            .by(0.2, {position: cc.v3(-m.width, 0, 0)})
                                            .call(function () {
                                                (d = !0), r();
                                            })
                                            .start();
                                    var f = new cc.Node();
                                    m.addChild(f),
                                        f.addComponent(cc.Sprite),
                                        (f.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                            a.navigateGroupRes.NavigateGroupRightTuck
                                        )),
                                        (f.width = 0.5 * m.width),
                                        (f.height = 1.2 * f.width),
                                        (f.x = 0.65 * -m.width),
                                        (f.y = 0.3 * m.height),
                                        f.on(cc.Node.EventType.TOUCH_END, function () {
                                            d &&
                                                cc
                                                    .tween(m)
                                                    .by(0.5, {position: cc.v3(m.width, 0, 0)})
                                                    .call(function () {
                                                        (d = !1), (s.active = !0), r(), m.destroy();
                                                    })
                                                    .start();
                                        }),
                                        (h = new cc.Node()),
                                        m.addChild(h),
                                        h.addComponent(cc.Mask),
                                        (h.getComponent(cc.Mask).type = 0),
                                        (h.width = 0.8 * m.width),
                                        (h.height = 0.85 * m.height),
                                        (h.x = m.width / 13),
                                        (h.y = -m.height / 22),
                                        (_ = new cc.Node()),
                                        h.addChild(_),
                                        (_.x = 0),
                                        (_.y = 0);
                                    var g,
                                        v = function (e) {
                                            var t = i();
                                            (g = new cc.Node()),
                                                _.addChild(g),
                                                g.addComponent(cc.Sprite),
                                                (g.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                    a.pushGameListIconTexture[t.index]
                                                )),
                                                (g.width = 0.9 * h.width),
                                                (g.height = g.width),
                                                (g.x = 0),
                                                (g.y = 1.15 * -(e - 2) * g.height),
                                                g.on(cc.Node.EventType.TOUCH_START, function () {
                                                    a.jumpToMiniGame(t);
                                                }),
                                                (a.nodeArr_NavigateGroupGetIcon[e] = g);
                                        };
                                    for (p = 0; p < 6; p++) v(p);
                                    cc.tween(_)
                                        .repeatForever(
                                            cc
                                                .tween()
                                                .delay(1)
                                                .by(3, {position: cc.v3(0, 1.15 * g.height)})
                                                .call(function () {
                                                    a.nodeArr_NavigateGroupGetIcon[0].y -= 1.15 * 6 * g.height;
                                                    for (var e = a.nodeArr_NavigateGroupGetIcon[0], t = 0; t < 6; t++)
                                                        t < 5 &&
                                                            (a.nodeArr_NavigateGroupGetIcon[t] =
                                                                a.nodeArr_NavigateGroupGetIcon[t + 1]);
                                                    a.nodeArr_NavigateGroupGetIcon[5] = e;
                                                })
                                        )
                                        .start();
                                }
                            };
                        s.on(cc.Node.EventType.TOUCH_START, function (e) {
                            var t = e.touch;
                            l = t.getLocation();
                        }),
                            s.on(cc.Node.EventType.TOUCH_END, function (e) {
                                var t = e.touch;
                                c = t.getLocation();
                                var o = Math.abs(c.x - l.x),
                                    n = Math.abs(c.y - l.y);
                                o <= 20 &&
                                    n <= 20 &&
                                    (console.log("ChaoQiGameSDK", "点击icon 展开互推列表"),
                                    c.x <= cc.winSize.width / 2 ? h(!0) : h(!1)),
                                    s.setPosition(
                                        s.parent.convertToNodeSpaceAR(
                                            cc.v2(
                                                c.x >= cc.winSize.width / 2
                                                    ? cc.winSize.width - s.width / 2
                                                    : s.width / 2,
                                                c.y
                                            )
                                        )
                                    ),
                                    s.active && r();
                            }),
                            s.on(cc.Node.EventType.TOUCH_MOVE, function (e) {
                                var t = e.touch;
                                s.setPosition(s.parent.convertToNodeSpaceAR(t.getLocation()));
                            }),
                            r();
                    }
                } else console.log("ChaoQiGameSDK", "互推icon资源未加载完成");
            }),
            (e.prototype.hideNavigateGroup = function () {
                (this.isShow_NavigateGroup = !1),
                    this.timeout_hideNavigateGroupIcon && clearTimeout(this.timeout_hideNavigateGroupIcon),
                    this.node_navigateGroup &&
                        (console.log("ChaoQiGameSDK", "hideNavigateGroup==========================="),
                        this.node_navigateGroup.removeFromParent(),
                        (this.node_navigateGroup = null));
            }),
            (e.prototype.getNavigateSettleFlag = function () {
                return this.loadSucc_NavigateSettle && this.loadSucc_PushGameList && !this.isShow_NavigateSettle;
            }),
            (e.prototype.showNavigateSettle = function (e, t, o) {
                var n = this;
                if (this.loadSucc_NavigateSettle && this.loadSucc_PushGameList) {
                    if (this.pushGameList.length < 6)
                        console.log("ChaoQiGameSDK", "后台配置互推游戏样式数量小于6个,无法展示");
                    else if (1 == e || 2 == e) {
                        if (this.isShow_NavigateSettle)
                            console.log("ChaoQiGameSDK", "已存在结算互推,请勿多次调用showNavigateSettle");
                        else {
                            this.isShow_NavigateSettle = !0;
                            for (var a = cc.director.getScene(), i = [], r = 0; r < this.pushGameList.length; r++)
                                (i[r] = this.pushGameList[r]), (i[r].index = r);
                            var s = function () {
                                for (var e = 0, t = 0; t < i.length; t++) e += i[t].sort;
                                for (var o = Math.floor(Math.random() * e), n = 0, a = 0; a < i.length; a++) {
                                    if (o >= n && o < n + i[a].sort) {
                                        var r = i[a];
                                        return i.splice(a, 1), r;
                                    }
                                    n += i[a].sort;
                                }
                            };
                            switch (
                                (1 == e &&
                                    cc.winSize.height / cc.winSize.width <= 16 / 9 &&
                                    (console.log("ChaoQiGameSDK", "该设备分辨率低于16/9 改为展示类型2"),
                                    (e = 2),
                                    (o = 0)),
                                console.log(
                                    "ChaoQiGameSDK",
                                    "WX showNavigateSettle==================",
                                    "type：",
                                    e,
                                    "y:",
                                    o
                                ),
                                e)
                            ) {
                                case 1:
                                    (this.isShow_NavigateSettle1 = !0),
                                        this.hideBanner(),
                                        (this.node_navigateSettle = new cc.Node("node_navigateSettle")),
                                        a.addChild(this.node_navigateSettle),
                                        "" != this.AdGroup && (this.node_navigateSettle.group = this.AdGroup),
                                        this.node_navigateSettle.addComponent(cc.Sprite),
                                        (this.node_navigateSettle.getComponent(cc.Sprite).spriteFrame =
                                            new cc.SpriteFrame(this.navigateSettleRes.NavigateSettle1Bg)),
                                        cc.winSize.width < cc.winSize.height
                                            ? ((this.node_navigateSettle.width = (9 * cc.winSize.width) / 10),
                                              (this.node_navigateSettle.height =
                                                  (2 * this.node_navigateSettle.width) / 3))
                                            : ((this.node_navigateSettle.width = (9 * cc.winSize.height) / 10),
                                              (this.node_navigateSettle.height =
                                                  (2 * this.node_navigateSettle.width) / 3)),
                                        (this.node_navigateSettle.x = cc.winSize.width / 2),
                                        (this.node_navigateSettle.y = this.node_navigateSettle.height / 2 + o);
                                    for (
                                        var l = function (e) {
                                                var t = s(),
                                                    o = new cc.Node("IconNode");
                                                c.node_navigateSettle.addChild(o),
                                                    (o.width = c.node_navigateSettle.width / 4),
                                                    (o.height = o.width),
                                                    (o.x = ((e % 3) - 1) * ((4 * o.width) / 3)),
                                                    (o.y = e < 3 ? (3 * o.width) / 5 : (7 * -o.width) / 10);
                                                var a = new cc.Node("NavigateSettleIconMask");
                                                o.addChild(a),
                                                    a.addComponent(cc.Mask),
                                                    (a.getComponent(cc.Mask).type = cc.Mask.Type.IMAGE_STENCIL),
                                                    (a.getComponent(cc.Mask).spriteFrame = new cc.SpriteFrame(
                                                        c.navigateSettleRes.NavigateSettleIconMask
                                                    )),
                                                    (a.getComponent(cc.Mask).alphaThreshold = 0.1),
                                                    (a.width = o.width),
                                                    (a.height = o.width);
                                                var i = new cc.Node("icon");
                                                a.addChild(i),
                                                    i.addComponent(cc.Sprite),
                                                    c.pushGameListIconTexture[t.index] &&
                                                        (i.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                            c.pushGameListIconTexture[t.index]
                                                        )),
                                                    (i.width = a.width),
                                                    (i.height = a.height);
                                                var r = new cc.Node("button");
                                                o.addChild(r),
                                                    r.addComponent(cc.Sprite),
                                                    (r.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                        c.navigateSettleRes.NavigateSettleIconYellow
                                                    )),
                                                    (r.width = o.width + 8),
                                                    (r.height = o.height + 8);
                                                var l = new cc.Node("NavigateSettleNameBg");
                                                o.addChild(l),
                                                    l.addComponent(cc.Sprite),
                                                    (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                        c.navigateSettleRes.NavigateSettleNameBg
                                                    )),
                                                    (l.width = o.width),
                                                    (l.height = o.width / 5),
                                                    (l.y = -o.height / 2 - l.height / 1.6);
                                                var d = new cc.Node("iconName");
                                                l.addChild(d),
                                                    d.addComponent(cc.Label),
                                                    (d.getComponent(cc.Label).fontSize = 35),
                                                    (d.getComponent(cc.Label).verticalAlign = 1),
                                                    (d.getComponent(cc.Label).string =
                                                        t.pushGameName.length > 5
                                                            ? t.pushGameName.substring(0, 5) + "..."
                                                            : t.pushGameName),
                                                    i.on(cc.Node.EventType.TOUCH_START, function () {
                                                        n.jumpToMiniGame(t);
                                                    });
                                            },
                                            c = this,
                                            d = 0;
                                        d < 6;
                                        d++
                                    )
                                        l(d);
                                    break;
                                case 2:
                                    (this.node_navigateSettle = new cc.Node("node_navigateSettle")),
                                        a.addChild(this.node_navigateSettle),
                                        this.node_navigateSettle.addComponent(cc.Sprite),
                                        (this.node_navigateSettle.getComponent(cc.Sprite).spriteFrame =
                                            new cc.SpriteFrame(this.navigateSettleRes.NavigateSettle2Bg)),
                                        cc.winSize.width < cc.winSize.height
                                            ? ((this.node_navigateSettle.width = cc.winSize.width),
                                              (this.node_navigateSettle.height = 0.3 * this.node_navigateSettle.width))
                                            : ((this.node_navigateSettle.width = cc.winSize.width / 2),
                                              (this.node_navigateSettle.height =
                                                  0.25 * this.node_navigateSettle.width)),
                                        (this.node_navigateSettle.x = cc.winSize.width / 2),
                                        (this.node_navigateSettle.y = this.node_navigateSettle.height / 2 + o),
                                        "" != this.AdGroup && (this.node_navigateSettle.group = this.AdGroup);
                                    var h = function (e) {
                                            var t = s(),
                                                o = new cc.Node("button");
                                            _.node_navigateSettle.addChild(o),
                                                (o.width = _.node_navigateSettle.width / 6),
                                                (o.height = o.width),
                                                (o.x = (-_.node_navigateSettle.width / 5) * (e - 2)),
                                                (o.y = 0.1 * o.height);
                                            var a = new cc.Node("NavigateSettleIconYellow");
                                            o.addChild(a),
                                                a.addComponent(cc.Sprite),
                                                (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                    _.navigateSettleRes.NavigateSettleIconYellow
                                                )),
                                                (a.width = o.width + 8),
                                                (a.height = o.height + 8);
                                            var i = new cc.Node("NavigateSettleIconMask");
                                            a.addChild(i),
                                                i.addComponent(cc.Mask),
                                                (i.getComponent(cc.Mask).type = cc.Mask.Type.IMAGE_STENCIL),
                                                (i.getComponent(cc.Mask).spriteFrame = new cc.SpriteFrame(
                                                    _.navigateSettleRes.NavigateSettleIconMask
                                                )),
                                                (i.getComponent(cc.Mask).alphaThreshold = 0.1),
                                                (i.width = o.width),
                                                (i.height = o.height);
                                            var r = new cc.Node("icon");
                                            i.addChild(r),
                                                r.addComponent(cc.Sprite),
                                                (r.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                                    _.pushGameListIconTexture[t.index]
                                                )),
                                                (r.width = o.width),
                                                (r.height = o.height);
                                            var l = new cc.Node("titleLabel");
                                            o.addChild(l), (l.color = cc.Color.BLACK), l.addComponent(cc.Label);
                                            var c = t.pushGameName;
                                            t.pushGameName.length > 4 && (c = c.substring(0, 4) + "..."),
                                                (l.getComponent(cc.Label).string = c),
                                                (l.getComponent(cc.Label).fontSize = 30),
                                                (l.getComponent(cc.Label).overflow = cc.Label.Overflow.SHRINK),
                                                (l.getComponent(cc.Label).enableWrapText = !1),
                                                (l.getComponent(cc.Label).horizontalAlign =
                                                    cc.Label.HorizontalAlign.CENTER),
                                                (l.width = r.width),
                                                (l.height = 0.4 * r.height),
                                                (l.x = 0),
                                                (l.y = -r.height / 2 - l.height / 2 - 10),
                                                r.on(cc.Node.EventType.TOUCH_START, function () {
                                                    n.jumpToMiniGame(t);
                                                });
                                        },
                                        _ = this;
                                    for (d = 0; d < 5; d++) h(d);
                            }
                        }
                    } else console.log("ChaoQiGameSDK", "结算互推只存在类型1和类型2 return");
                } else console.log("ChaoQiGameSDK", "结算互推资源未加载完成");
            }),
            (e.prototype.hideNavigateSettle = function () {
                (this.isShow_NavigateSettle = !1),
                    (this.isShow_NavigateSettle1 = !1),
                    this.node_navigateSettle &&
                        (console.log("ChaoQiGameSDK", "hideNavigateSettle==========================="),
                        this.node_navigateSettle.removeFromParent(),
                        (this.node_navigateSettle = null));
            }),
            (e.prototype.getNavigateBoxBannerFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateBoxBanner = function () {}),
            (e.prototype.hideNavigateBoxBanner = function () {}),
            (e.prototype.getNavigateBoxPortalFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateBoxPortal = function () {}),
            (e.prototype.setGroup = function (e) {
                this.AdGroup = e;
            }),
            (e.prototype.hasAddDesktopFunc = function () {
                return !1;
            }),
            (e.prototype.getAddDesktopFlag = function (e) {
                e(!1);
            }),
            (e.prototype.addDesktop = function (e) {
                e(!1);
            }),
            (e.prototype.phoneVibrate = function (e) {
                "long" == e
                    ? wx.vibrateLong({
                          success: function () {},
                          fail: function (e) {
                              console.log("ChaoQiGameSDK", "WX vibrateLong调用失败", JSON.stringify(e));
                          }
                      })
                    : "short" == e &&
                      wx.vibrateShort({
                          type: "heavy",
                          success: function () {},
                          fail: function (e) {
                              console.log("ChaoQiGameSDK", "WX vibrateShort调用失败", JSON.stringify(e));
                          }
                      });
            }),
            (e.prototype.startGameVideo = function () {}),
            (e.prototype.pauseGameVideo = function () {}),
            (e.prototype.resumeGameVideo = function () {}),
            (e.prototype.stopGameVideo = function () {}),
            (e.prototype.shareVideo = function () {}),
            (e.prototype.jumpToMoreGamesCenter = function () {}),
            (e.prototype.showMoreGamesBanner = function () {}),
            (e.prototype.hideMoreGamesBanner = function () {}),
            (e.prototype.showFavoriteGuide = function () {}),
            (e.prototype.getBoxFlag = function () {
                return !1;
            }),
            (e.prototype.showAppBox = function () {}),
            (e.prototype.getBlockFlag = function () {
                return this.loadSucc_Block;
            }),
            (e.prototype.showBlock = function () {}),
            (e.prototype.hideBlock = function () {}),
            (e.prototype.getVideoIntersFlag = function () {
                return !1;
            }),
            (e.prototype.showVideoInters = function () {}),
            (e.prototype.exitTheGame = function () {}),
            (e.prototype.reportAnalytics = function () {}),
            (e.prototype.showAuthentication = function () {}),
            (e.prototype.visitorExperience = function () {}),
            (e.prototype.showNativeAd = function () {}),
            (e.prototype.getOPPOShowMoreGameFlag = function () {
                return !1;
            }),
            (e.prototype.showOPPOMoreGame = function () {}),
            (e.prototype.hasNetwork = function () {}),
            (e.prototype.showReviewAlert = function () {}),
            (e.prototype.showiOSADWithScene = function () {}),
            (e.prototype.showiOSADWithType = function () {}),
            (e.prototype.videoUIShow = function () {}),
            (e.prototype.showPrivacyAgreement = function () {}),
            (e.prototype.getErrBannerFlag = function () {
                return (
                    this.NUM_NowGetErrBannerFlag++,
                    this.NUM_NowGetErrBannerFlag == this.NUM_BannerErrMust
                        ? (console.log("ChaoQiGameSDK", "b 第" + this.NUM_BannerErrMust + "次出现"), !0)
                        : this.NUM_BannerErrP > 0 &&
                          (this.NUM_NowErrBanner >= this.NUM_BannerErrMost
                              ? (console.log("ChaoQiGameSDK", "已达上限 b"), !1)
                              : (console.log("ChaoQiGameSDK", "Pb", this.NUM_BannerErrP),
                                Math.floor(100 * Math.random()) < this.NUM_BannerErrP && (this.NUM_NowErrBanner++, !0)))
                );
            }),
            (e.prototype.showErrBanner = function (e) {
                var t = this;
                if (this.isShow_ErrBanner) console.log("ChaoQiGameSDK", "已经调用过showErrBanner,请勿重复调用");
                else {
                    (this.isShow_ErrBanner = !0),
                        this.hideBanner(),
                        (this.NUM_errBannerHasCallback = 0),
                        console.log("ChaoQiGameSDK", "WX showErrBanner==================");
                    var o = cc.director.getScene();
                    (this.node_ErrBanner = new cc.Node("node_ErrBanner")),
                        o.addChild(this.node_ErrBanner),
                        "" != this.AdGroup && (this.node_ErrBanner.group = this.AdGroup),
                        n.default.loadResArray(
                            [
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/ErrBanner/BlackBg.png",
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/ErrBanner/ErrBannerReward.png",
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/ErrBanner/ErrBannerButton.png",
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/ErrBanner/ErrBannerProgress.png",
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/ErrBanner/ErrBannerBar.png"
                            ],
                            function (o, n) {
                                var a = new cc.Node("errBannerBg");
                                t.node_ErrBanner.addChild(a),
                                    a.addComponent(cc.Sprite),
                                    (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[0])),
                                    (a.width = cc.winSize.width),
                                    (a.height = cc.winSize.height),
                                    (a.x = cc.winSize.width / 2),
                                    (a.y = cc.winSize.height / 2),
                                    (a.opacity = 200);
                                var i = new cc.Node("reward");
                                t.node_ErrBanner.addChild(i),
                                    i.addComponent(cc.Sprite),
                                    (i.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[1])),
                                    (i.width = 0.62 * cc.winSize.width),
                                    (i.height = 1.15 * i.width),
                                    (i.x = cc.winSize.width / 2),
                                    (i.y = 0.7 * cc.winSize.height);
                                var r = new cc.Node("button");
                                t.node_ErrBanner.addChild(r),
                                    r.addComponent(cc.Sprite),
                                    (r.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[2])),
                                    r.addComponent(cc.Widget),
                                    (r.getComponent(cc.Widget).isAlignBottom = !0),
                                    (r.getComponent(cc.Widget).bottom = cc.winSize.height / 20),
                                    (r.width = 0.75 * cc.winSize.width),
                                    (r.height = 0.38 * r.width),
                                    (r.x = cc.winSize.width / 2);
                                var s = new cc.Node("progressBar");
                                t.node_ErrBanner.addChild(s),
                                    s.addComponent(cc.Sprite),
                                    (s.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[3])),
                                    s.addComponent(cc.ProgressBar),
                                    (s.getComponent(cc.Sprite).type = cc.Sprite.Type.FILLED),
                                    (s.getComponent(cc.Sprite).fillStart = 0),
                                    (s.getComponent(cc.Sprite).fillRange = 1);
                                var l = new cc.Node("bar");
                                s.addChild(l);
                                var c = l.addComponent(cc.Sprite);
                                (c.spriteFrame = new cc.SpriteFrame(n[4])),
                                    (c.fillType = cc.Sprite.FillType.HORIZONTAL),
                                    (c.type = cc.Sprite.Type.FILLED),
                                    (c.fillStart = 0),
                                    (c.fillRange = 1),
                                    (s.getComponent(cc.ProgressBar).barSprite = l.getComponent(cc.Sprite)),
                                    (s.getComponent(cc.ProgressBar).mode = cc.ProgressBar.Mode.FILLED),
                                    (s.getComponent(cc.ProgressBar).totalLength = s.width),
                                    (s.getComponent(cc.ProgressBar).progress = 0),
                                    (s.width = 0.75 * cc.winSize.width),
                                    (s.height = 0.06 * s.width),
                                    (s.x = cc.winSize.width / 2),
                                    (s.y = cc.winSize.height / 2),
                                    s.addComponent(cc.Widget),
                                    (s.getComponent(cc.Widget).isAlignBottom = !0),
                                    (s.getComponent(cc.Widget).bottom = cc.winSize.height / 5),
                                    (l.height = s.height),
                                    (l.x = -s.width / 2),
                                    (l.anchorX = 0),
                                    a.on(cc.Node.EventType.TOUCH_START, function () {});
                                var d = null,
                                    h = s.getComponent(cc.ProgressBar).progress;
                                r.on(cc.Node.EventType.TOUCH_START, function () {
                                    if (
                                        (null == d &&
                                            (d = setInterval(function () {
                                                h >= 0.005 &&
                                                    ((h -= 0.005), (s.getComponent(cc.ProgressBar).progress = h));
                                            }, 100)),
                                        (h += 0.05),
                                        (s.getComponent(cc.ProgressBar).progress = h),
                                        h >= 0.5 &&
                                            !t.errBannerHasShowBanner &&
                                            (wx.onShow(function () {
                                                t.NUM_errBannerHasCallback >= 1 ||
                                                    (t.NUM_errBannerHasCallback++, t.hideErrBanner(), e(!0));
                                            }),
                                            t.showBanner(),
                                            (t.errBannerHasShowBanner = !0),
                                            setTimeout(function () {
                                                t.hideBanner();
                                            }, 2e3)),
                                        h >= 0.99)
                                    ) {
                                        if ((null != d && clearInterval(d), t.NUM_errBannerHasCallback >= 1)) return;
                                        t.NUM_errBannerHasCallback++, t.hideErrBanner(), e(!0);
                                    }
                                });
                            }
                        );
                }
            }),
            (e.prototype.hideErrBanner = function () {
                wx.offShow(function () {}),
                    this.isShow_ErrBanner &&
                        (console.log("ChaoQiGameSDK", "WX hideErrBanner=================="),
                        (this.isShow_ErrBanner = !1),
                        (this.errBannerHasShowBanner = !1),
                        this.node_ErrBanner && (this.node_ErrBanner.removeFromParent(), (this.node_ErrBanner = null)));
            }),
            (e.prototype.getErrVideoFlag = function () {
                return (
                    this.NUM_NowGetErrVideoFlag++,
                    this.NUM_NowGetErrVideoFlag == this.NUM_VideoErrMust
                        ? (console.log("ChaoQiGameSDK", "v 第" + this.NUM_VideoErrMust + "次出现"), !0)
                        : this.NUM_NowErrVideo >= this.NUM_VideoErrMost
                        ? (console.log("ChaoQiGameSDK", "已达上限 v"), !1)
                        : this.loadSucc_Video
                        ? this.NUM_VideoErrP > 0 &&
                          (console.log("ChaoQiGameSDK", "Pv", this.NUM_VideoErrP),
                          Math.floor(100 * Math.random()) < this.NUM_VideoErrP && (this.NUM_NowErrVideo++, !0))
                        : (console.log("ChaoQiGameSDK", "WX 视频广告未加载完成"), !1)
                );
            }),
            (e.prototype.buyProps = function (e, t, o, n) {
                n(!1, "");
            }),
            (e.prototype.payComplete = function () {}),
            (e.prototype.checkBannerLoadSucc = function () {
                var e = this;
                if (
                    ((this.loadSucc_Banner = this.SW_SystemBanner && this.loadSucc_SystemBanner),
                    console.log(
                        "ChaoQiGameSDK",
                        "banner加载成功?",
                        this.loadSucc_Banner,
                        ++this.NUM_CheckBannerLoadSucc
                    ),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc),
                    this.loadSucc_Banner)
                )
                    this.showBanner();
                else {
                    if (this.NUM_CheckBannerLoadSucc >= this.NUM_MaxCheckBannerLoadSucc) return;
                    this.timeout_checkBannerLoadSucc = setTimeout(function () {
                        e.checkBannerLoadSucc();
                    }, 5e3);
                }
            }),
            (e.prototype.showSystemBanner = function () {
                this.bannerAd &&
                    this.loadSucc_SystemBanner &&
                    (console.log("ChaoQiGameSDK", "WX showSystemBanner========================"), this.bannerAd.show());
            }),
            (e.prototype.updateSystemBanner = function () {
                var e = this;
                this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    (this.interval_updateBanner = setInterval(function () {
                        console.log("ChaoQiGameSDK", "WX updateSystemBanner========================"),
                            e.bannerAd.destroy(),
                            (e.bannerAd = null),
                            e.createSystemBanner();
                    }, 1e3 * this.NUM_BannerUpdateTime));
            }),
            (e.prototype.hideSystemBanner = function () {
                this.bannerAd &&
                    (console.log("ChaoQiGameSDK", "WX hideSystemBanner========================"), this.bannerAd.hide());
            }),
            (e.prototype.showSystemInters = function () {
                this.systemIntersAd &&
                    this.loadSucc_SystemInters &&
                    (console.log("ChaoQiGameSDK", "WX showSystemInters=================="), this.systemIntersAd.show());
            }),
            (e.prototype.jumpToMiniGame = function () {}),
            (e.prototype.runIntersInterval = function () {
                var e = this;
                this.NUM_IntersIntervalTime > 0 &&
                    setInterval(function () {
                        e.NUM_IntersNowIntervalTime++;
                    }, 1e3);
            }),
            e
        );
    })();
o.default = i;
